import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:test2/pages/first_page.dart'; // 导入你的页面文件
import 'package:test2/pages/second_page.dart';

class Routes {
  static final router = FluroRouter();

  static void configureRoutes(FluroRouter router) {
    // 定义路由路径和对应的页面构建器
    router.define('/', handler: Handler(
        handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
          return FirstPage(); // 默认首页
        }
    ));
    router.define('/second', handler: Handler(
        handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
          return SecondPage(); // 第二页
        }
    ));
  }
}